-
-
Notifications
You must be signed in to change notification settings - Fork 836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add vim docs & generators #370
Conversation
Do you need help documenting stuff? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @tjdevries
9988247
to
a8a3045
Compare
I will take a look into working on helping to set this up in the coming week. Would love to be able to have telescope help docs in Telescope! |
@Conni2461 do you think we can just merge this in so we can do the rest of the things one file at a time? It seems fine and safe to do. |
I can add some docs about how to generate before merging |
Sure we can merge that. :) I added a CI job that will generate the documentation on push and will only push a new commit if there are changes to the documentation. That way not everyone that is developing a cool new thing needs to remember that he also have to install that plugin, configure it and generate the documentation. For everyone that is still wondering how to do it here are basically the instructions 84c9c95#diff-b332355fbe62a7a35ec05e424ec8ebb9ecf212e7f0c388cecfe022e1c2980811R33-R53 😆 You also have to remove the parser in nvim-treesitter and the queries otherwise there will be errors. On the other hand if someone wanna fix a typo and just updates the doc, that person will have a bad time because CI will just revert everything. But that way its actually easier to understand that people shouldn't touch |
I've taken a look through the file changes in this PR, and I think I have the general idea of what is happening, but to be honest I don't know a ton about CI or treesitter. I'm a bit confused as to what it is that was needed for me to do to help get the help menu docs set up for telescope. Is it going and documenting the different functions in Telescope with docstrings, once this PR is merged? I'll try to remember to ask TJ on stream about this, maybe there's just something I'm missing which is why it's not clicking as to how I can help here. |
Maybe i should break it down a little bit better for the future as well. And maybe we can document that somewhere. Maybe we should introduce a Ideais generating docs based on the tree sitter syntax tree. TJ wrote a grammar that includes the documentation in this syntax tree so we can do take this function header documentation and transform it into vim documentation. All documentation will be exported that is part of the returning module. So example: local m = {}
--- Test Header
--@return 1: Returns always 1
function m.a()
return 1
end
return m Something like this. What is missing?The docgen has some problems on which people can work. This would happen in https://github.com/tjdevries/tree-sitter-lua and documentation of some modules here. How to do it:The easy way would be after this PR is merged
The other option would be setting up https://github.com/tjdevries/tree-sitter-lua
Okay i hope i haven't missed something and this answers your questions. If not or if something doesn't work correctly feel free to leave them here. |
@Conni2461 sweet! Thank you so much for the thorough explanation, and now from chatting on stream I see how I can contribute here. I'll definitely plan on reading through the telescope codebase in the coming weeks to see what I can help document. I'm new to Lua, but I'm also trying to write my own Lua Neovim plugin at the moment, so I'm sure getting to know the Telescope codebase better and helping to document it will help me in my own pursuit of making my own Neovim plugin with Lua! |
skip-checks: true
lua/telescope/config.lua
Outdated
]]) | ||
|
||
set("selection_strategy", "reset", [[ | ||
nevermind, read the source code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You wanna know what it does :)
@smithbm2316 I'm pretty close to getting this merged, then you can start adding documentation to things like builtins would be super helpful. If there's anything else you're interested in, let me know, we can start there (like layout, previewers, etc.) |
@tjdevries Great, thanks for the update! I will definitely start there. I've actually already been poking around in the |
OK, I'm merging. This is a good start. Anyone can update docs how they want after this (and we move some of the readme into the help docs now, and just say "see :help telescope.blah" or whatever. This will at least unblock people from doing new docs. |
No description provided.